<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
	<title>注册</title>
	<meta charset="UTF-8"/>
	<script type="text/javascript" src="/js/jquery-3.2.js"></script>
	<script type="text/javascript">
		function validate(){
			var password = document.getElementById("password").value;
			var rePassword = document.getElementById("rePassword").value;

			if (password !== rePassword)
			{
				document.getElementById("passwordError").innerHTML="两次输入密码不一致";
				document.getElementById("submit").disabled = true;
			}
			else
			{
				document.getElementById("passwordError").innerHTML="";
				document.getElementById("submit").disabled = false;
			}
		}


	</script>
	<link rel="stylesheet" type="text/css" href="/css/mygoodsshelf.css"/>
	<link rel="stylesheet" type="text/css" href="/css/upload.css"/>

</head>
<body>

<nav class="navbar">
	<div class="nav-menu">
		<ul class="menu">
			<li><a href="/">首页</a></li>
		</ul>
	</div>
</nav>

<div class="titleName">
	<h3>输入个人注册信息</h3>
</div>

<div class="container">
	<form action="/registerUser.do" method="post">
		<p>
			<span class="name-icon">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
			学&nbsp;&nbsp;&nbsp;号&nbsp;：<input type="text" name="sNum" th:text="${sNumError}"/>
		</p><br/>

		<p>
			<span class="name-icon">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
			用&nbsp;&nbsp;户&nbsp;&nbsp;名：<input type="text" name="Uname" th:text="${uNameError}"/>
		</p><br/>

		<p>
			<span class="number-icon">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
			密&nbsp;&nbsp;&nbsp;码&nbsp;：<input id="password" type="password" name="Password" th:text="${pwdError}"/>
		</p><br/>
		<p>
			<span class="desc-icon">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
			确认密码：<input id="rePassword" type="password" onkeyup="validate()" name="rePassword"/>
			<span id="passwordError" style="color: red"></span>
		</p>
		<br/>
		<p>
			<span class="name-icon">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
			邮&nbsp;&nbsp;&nbsp;箱&nbsp;：<input type="text" name="Email" th:text="${emailError}"/>
		</p><br/>
		<p>
			<span class="desc-icon">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
			联系电话：<input type="text" name="PhoneNum" th:text="${phoneNumError}"/>
		</p><br/>
		<p th:type="error" th:if="${emptyError}!=null" th:text="${emptyError}"></p>
		<input id="submit" type="submit" class="submit-btn" name="goods-submit"/>
	</form>
</div>
<footer>
	<a href="#">©2021-7 二手物品交易</a>
	<a href="#">意见反馈&nbsp;&nbsp;&nbsp;联系我们&nbsp;&nbsp;&nbsp;隐私权声明&nbsp;&nbsp;&nbsp;使用条款</a>
</footer>
</body>
</html>